<?php
/*
*
*/

class jeegoon{

var $db_link;
var $db_result;
var $db_host;
var $db_user;
var $db_passwd;
var $db_database;
var $db_query;


	function jeegoon($db_host='p50mysql53.secureserver.net',$db_user='jeegoon',$db_passwd='Myproject2008',$db_database='jeegoon'){
		$this->db_host = $db_host;
		$this->db_user = $db_user;
		$this->db_passwd = $db_passwd;
		$this->db_database = $db_database;
		
		$this->db_link = mysql_connect($this->db_host,$this->db_user,$this->db_passwd)or die("Could not connect:" . mysql_error());
		mysql_select_db($this->db_database, $this->db_link) or die ('Can\'t use jeegoon : ' . mysql_error());	
	}

	function query($query){
		mysql_query("SET NAMES utf8;");

		$this->db_query=$query;
		if($this->db_query==null)
		{
			$this->db_query = "select * from member ;";
		}
		$this->db_result = mysql_query($this->db_query) or die("Invalid query: " . mysql_error());
		return $this->db_result;
	}
       function querycount($query){
                mysql_query("SET NAMES utf8;");

                $this->db_query=$query;
                if($this->db_query==null)
                {
                        $this->db_query = "select * from member ;";
                }
                $this->db_result = mysql_query($this->db_query) or die("Invalid query: " . mysql_error());

                return mysql_affected_rows();
        }
		
}

?>
